object UniMainModule: TUniMainModule
  OldCreateOrder = False
  OnCreate = UniGUIMainModuleCreate
  OnDestroy = UniGUIMainModuleDestroy
  Theme = 'triton'
  MonitoredKeys.Keys = <>
  OnBeforeLogin = UniGUIMainModuleBeforeLogin
  Height = 495
  Width = 696
  object UniFSTheme1: TUniFSTheme
    Style = Vulkan
    Enabled = True
    Left = 536
    Top = 8
  end
  object FSiGrowl: TUniFSiGrowl
    Messages = 'Hello World!'
    Types = Info
    AlertSize = Regular
    Icon = linecons_lab
    Delay = 2500
    Spacing = 20
    OffsetX = 20
    OffsetY = 20
    EnableAnimation = True
    EnterAnimation = fadeIn
    ExitAnimation = fadeOut
    PlacementX = right
    PlacementY = top
    Left = 616
    Top = 8
  end
  object FDConnection: TFDConnection
    Params.Strings = (
      'Database=wiUniGUI'
      'User_Name=sa'
      'Password=1qaz3EDC'
      'Server=127.0.0.1'
      'DriverID=MSSQL')
    LoginPrompt = False
    Left = 48
    Top = 16
  end
  object qryMultiCompany: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'select '
      '  fldCompanyCode '
      'from '
      '  tblSystemParameters')
    Left = 136
    Top = 104
  end
  object qryFunctionList: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'select '
      '  fldFunctionCode, '
      '  fldFormClassName, '
      '  fldPackageName '
      'from '
      '  tblFunctionList')
    Left = 224
    Top = 104
  end
  object qryGetItemUnitCost: TFDQuery
    BeforeOpen = qryGetItemUnitCostBeforeOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      
        'select fldUnitCost = dbo.fn_GetItemUnitCost (:ItemCode , :LotNo,' +
        ' :dDate, :iCostingMethod)')
    Left = 224
    Top = 56
    ParamData = <
      item
        Name = 'ITEMCODE'
        ParamType = ptInput
      end
      item
        Name = 'LOTNO'
        ParamType = ptInput
      end
      item
        Name = 'DDATE'
        ParamType = ptInput
      end
      item
        Name = 'ICOSTINGMETHOD'
        ParamType = ptInput
      end>
  end
  object qrySystemParameters: TFDQuery
    AfterOpen = qrySystemParametersAfterOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'SELECT'
      '  * '
      'FROM'
      '  tblSystemParameters')
    Left = 48
    Top = 168
  end
  object qryMainMenu: TFDQuery
    BeforeOpen = qryMainMenuBeforeOpen
    AfterOpen = qryMainMenuAfterOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evRowsetSize, evCursorKind]
    FetchOptions.CursorKind = ckStatic
    FetchOptions.RowsetSize = -1
    SQL.Strings = (
      'DECLARE @sUserCode VARCHAR(30)'
      'SET @sUserCode =  :UserCode --'#39'SUPERVISOR'#39
      ''
      'DECLARE @tmpUserRights TABLE ('
      '  fldFunctionCode VARCHAR(50),'
      '  fldValue NUMERIC(2)'
      ')'
      ''
      'INSERT INTO @tmpUserRights'
      'SELECT'
      '  fldFunctionCode,'
      
        '  fldValue = cast(fldNew as int) + cast(fldEdit as int) + cast(f' +
        'ldDelete as int) + cast(fldPreview as int) + cast(fldReadOnly as' +
        ' int)'
      'FROM'
      '  tblUserOverAllRightsDetails'
      'WHERE fldUserCode= @sUserCode'
      ''
      
        'SELECT A.fldFunctionCode, A.fldParentCode,fldMainMenuCode, fldKe' +
        'yFieldName, fldFunctionName1, fldFunctionName2, fldFunctionName3' +
        ', '
      
        '  fldUserName1, fldUserName2, fldUserName3, fldIsAFunction, fldR' +
        'eportFileName'
      'FROM tblFunction A, @tmpUserRights B'
      
        'WHERE A.fldFunctionCode = B.fldFunctionCode and fldValue > 0 and' +
        '  CharIndex(A.fldModuleType, :ModuleType) > 0'
      'UNION ALL'
      
        'SELECT fldFunctionCode,fldParentCode,fldMainMenuCode,fldKeyField' +
        'Name,fldFunctionName1,fldFunctionName2,fldFunctionName3,'
      
        '  fldUserName1,fldUserName2, fldUserName3,  fldIsAFunction, fldR' +
        'eportFileName'
      'FROM tblFunction '
      'WHERE fldNeedPopedomControl = 0'
      'ORDER BY fldMainMenuCode ASC')
    Left = 136
    Top = 160
    ParamData = <
      item
        Name = 'USERCODE'
        ParamType = ptInput
      end
      item
        Name = 'MODULETYPE'
        ParamType = ptInput
      end>
  end
  object qryGetServerDateTime: TFDQuery
    AfterOpen = qryGetServerDateTimeAfterOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'SELECT'
      '  fldDateTime = GetDate()')
    Left = 224
    Top = 168
    object fldGTDateTime: TSQLTimeStampField
      FieldName = 'fldDateTime'
      Origin = 'fldDateTime'
      ReadOnly = True
      Required = True
    end
  end
  object qryLanguageType: TFDQuery
    AfterOpen = qryLanguageTypeAfterOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'SELECT'
      '  fldLanguageType, '
      '  fldLanguage1, '
      '  fldLanguage2, '
      '  fldLanguage3, '
      '  fldFontName, '
      '  fldCharset, '
      '  fldFontSize, '
      '  fldFontStyle,'
      '  fldDoubleByte, '
      '  fldUse,'
      '  fldFontUseHeight'
      'FROM'
      '  tblLanguageType'
      'WHERE'
      '  fldLanguageType = :iLanguage')
    Left = 48
    Top = 232
    ParamData = <
      item
        Name = 'ILANGUAGE'
        ParamType = ptInput
      end>
  end
  object qryUserMenu: TFDQuery
    BeforeOpen = qryUserMenuBeforeOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evRowsetSize, evCursorKind]
    FetchOptions.CursorKind = ckStatic
    FetchOptions.RowsetSize = -1
    SQL.Strings = (
      'SELECT '
      '  B.fldFunctionCode,'
      '  B.fldParentCode, '
      '  fldIsAFunction,'
      '  fldKeyFieldName, '
      '  fldMainMenuCode, '
      '  fldReportFileName,'
      '  fldFunctionName1, '
      '  fldFunctionName2, '
      '  fldFunctionName3,  '
      '  fldUserName1, '
      '  fldUserName2, '
      '  fldUserName3'
      'FROM '
      '  tblUserMenuDetails A, tblFunction B'
      'WHERE'
      '  A.fldUserCode = :UserCode'
      '  and'
      '  A.fldFunctionCode = B.fldFunctionCode'
      '  and'
      '  CharIndex(B.fldModuleType, :ModuleType) > 0')
    Left = 136
    Top = 224
    ParamData = <
      item
        Name = 'USERCODE'
        ParamType = ptInput
        Value = Null
      end
      item
        Name = 'MODULETYPE'
        ParamType = ptInput
      end>
  end
  object qrySFCNToFL: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'select '
      '  fldSearchFormClass, '
      '  fldFunctionCode '
      'from '
      '  tblSearchFormClassToFunction')
    Left = 232
    Top = 232
  end
  object qryUser: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'SELECT'
      '  fldPassword,'
      '  fldLanguage,'
      '  fldUserCode,'
      '  fldSystemAdministrator,'
      '  fldEmail,'
      '  fldReceiveEmail,'
      '  fldChooseFunction'
      'FROM'
      '  tblUser'
      'WHERE'
      '  fldUserCode = :UserCode')
    Left = 40
    Top = 296
    ParamData = <
      item
        Name = 'USERCODE'
        ParamType = ptInput
      end>
  end
  object qryAllLanguage: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'select '
      '  fldLanguageType, '
      '  fldLanguage1, '
      '  fldLanguage2, '
      '  fldLanguage3 '
      'from '
      '   tblLanguageType')
    Left = 128
    Top = 288
  end
  object qryUserLog: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'SELECT'
      '  fldUserCode, '
      '  fldFunctionCode, '
      '  fldAction, '
      '  fldKeyFieldValue,'
      '  fldRemarks'
      'FROM'
      '  tblUserLog'
      'WHERE'
      '  1 = 2')
    Left = 40
    Top = 360
  end
  object qryLoginInfo: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'select '
      '  fldLogID, '
      '  fldCompanyCode, '
      '  fldUserCode, '
      '  fldComputerName, '
      '  fldComputerIP, '
      '  fldComputerUserName,'
      '  fldComputerDomain,'
      '  fldLoginTime, '
      '  fldLogoutTime '
      'from '
      '  tblLoginInfo'
      'where'
      '  1 = 2 ')
    Left = 40
    Top = 416
  end
  object qryOnHandQty: TFDQuery
    BeforeOpen = qryOnHandQtyBeforeOpen
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'declare @dDate datetime'
      'declare @FromDate datetime'
      'declare @ToDate datetime'
      'set @dDate = :dDate'
      'set @FromDate = dbo.fn_FromDate(@dDate)'
      'set @ToDate = dbo.fn_ToDate(@dDate)'
      
        'select fldOnHandQty = dbo.fn_GetItemLotLocationBinStock( :ItemCo' +
        'de , :LocationCode, :BinCode, :LotNo, @FromDate, @ToDate)')
    Left = 128
    Top = 360
    ParamData = <
      item
        Name = 'DDATE'
        DataType = ftDateTime
        ParamType = ptInput
      end
      item
        Name = 'ITEMCODE'
        DataType = ftString
        ParamType = ptInput
      end
      item
        Name = 'LOCATIONCODE'
        DataType = ftString
        ParamType = ptInput
      end
      item
        Name = 'BINCODE'
        DataType = ftString
        ParamType = ptInput
      end
      item
        Name = 'LOTNO'
        DataType = ftString
        ParamType = ptInput
      end>
    object fldOHQOnHandQty: TFMTBCDField
      FieldName = 'fldOnHandQty'
      Origin = 'fldOnHandQty'
      ReadOnly = True
      Precision = 38
      Size = 6
    end
  end
  object qryDynamicSQL: TFDQuery
    CachedUpdates = True
    Connection = FDConnection
    FetchOptions.AssignedValues = [evCursorKind]
    FetchOptions.CursorKind = ckStatic
    SQL.Strings = (
      'declare @dDate datetime'
      'declare @FromDate datetime'
      'declare @ToDate datetime'
      'set @dDate = :dDate'
      'set @FromDate = dbo.fn_FromDate(@dDate)'
      'set @ToDate = dbo.fn_ToDate(@dDate)'
      
        'select fldOnHandQty = dbo.fn_GetItemLotLocationBinStock( :ItemCo' +
        'de , :LocationCode, :BinCode, :LotNo, @FromDate, @ToDate)')
    Left = 128
    Top = 416
    ParamData = <
      item
        Name = 'DDATE'
        ParamType = ptInput
      end
      item
        Name = 'ITEMCODE'
        ParamType = ptInput
      end
      item
        Name = 'LOCATIONCODE'
        ParamType = ptInput
      end
      item
        Name = 'BINCODE'
        ParamType = ptInput
      end
      item
        Name = 'LOTNO'
        ParamType = ptInput
      end>
  end
  object cmdUpdateLogoutTime: TFDCommand
    Connection = FDConnection
    CommandKind = skStoredProc
    CommandText.Strings = (
      'SP_UPDATELOGOUTTIME;1')
    Left = 376
    Top = 16
  end
  object cmdStockDayBalance: TFDCommand
    Connection = FDConnection
    CommandKind = skStoredProc
    CommandText.Strings = (
      'SP_DOSTOCKDAYBALANCE;1')
    Left = 376
    Top = 80
  end
  object cmdStockMonthlyBalance: TFDCommand
    Connection = FDConnection
    CommandKind = skStoredProc
    CommandText.Strings = (
      'SP_DOSTOCKMONTHLYBALANCE;1')
    Left = 376
    Top = 144
  end
  object cmdDynamic: TFDCommand
    Connection = FDConnection
    CommandKind = skStoredProc
    CommandText.Strings = (
      'SP_DOSTOCKMONTHLYBALANCE;1')
    Left = 376
    Top = 216
  end
  object cmdUpdateStock: TFDCommand
    Connection = FDConnection
    CommandKind = skStoredProc
    CommandText.Strings = (
      'SP_UPDATESTOCK;1')
    Left = 368
    Top = 288
  end
  object cmdCustom: TFDCommand
    Connection = FDConnection
    CommandText.Strings = (
      'SP_UPDATESTOCK;1')
    Left = 368
    Top = 352
  end
  object cmdExecute: TFDCommand
    Connection = FDConnection
    CommandText.Strings = (
      'SP_UPDATESTOCK;1')
    Left = 368
    Top = 408
  end
  object BoConnection: TFDConnection
    Params.Strings = (
      'Database='
      'User_Name='
      'Password='
      'Server='
      'ConnectionDef=U8Server')
    LoginPrompt = False
    Left = 144
    Top = 16
  end
end
